import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

const router = new Router({
  mode: "hash",
  routes: [
    {
      path: "/",
      name: "index",
      redirect: "/",
      component: () => import("views/index.vue"),
      children: [
        {
          path: "/",
          name: "wallet",
          component: () => import("views/wallet/Wallet.vue")
        },
        {
          path: "/tendency",
          name: "tendency",
          component: () => import("views/tendency/Tendency.vue")
        },
        {
          path: "/asset",
          name: "asset",
          component: () => import("views/asset/Asset.vue")
        },
        {
          path: "/my",
          name: "my",
          component: () => import("views/my/My.vue")
        }
      ]
    },
    {
      path: '/dapp',
      name: 'dapp',
      redirect: "/homes",
      component: () => import('views/Dapp/Dapp.vue'),
      children:[
        {
          path: "/homes",
          name: "homes",
          component: () => import("views/Dapp/Homes.vue")
        },
        {
          path: "/transfor",
          name: "transfor",
          component: () => import("views/Dapp/Transfor.vue")
        },
        {
          path: "/games",
          name: "games",
          component: () => import("views/Dapp/Games.vue")
        },
        {
          path: "/shopping",
          name: "shopping",
          component: () => import("views/Dapp/Shopping.vue")
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('views/Login.vue')
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('views/Register.vue')
    },
    {
      path: '/asset_details',
      name: 'asset_details',
      component: () => import('views/asset/AssetDetail.vue')
    },
    {
      path: '/conversion',
      name: 'conversion',
      component: () => import('views/asset/Conversion.vue')
    },
    {
      path: '/receipt',
      name: 'receipt',
      component: () => import('views/wallet/Receipt.vue')
    },
    {
      path: '/pay',
      name: 'pay',
      component: () => import('views/wallet/Pay.vue')
    },
    {
      path: '/oil',
      name: 'oil',
      component: () => import('views/asset/Oil.vue')
    },
    {
      path: '/signIn',
      name: 'signIn',
      component: () => import('views/my/SignIn.vue')
    },
    {
      path: '/vip',
      name: 'vip',
      component: () => import('views/my/iconNav/Vip.vue')
    },
    {
      path: '/success',
      name: 'success',
      component: () => import('views/my/ApplyForOk.vue')
    },
    {
      path: '/faq/:type',
      name: 'faq',
      component: () => import('views/my/FAQ.vue')
    },
    {
      path: '/notice',
      name: 'notice',
      component: () => import('views/my/Notice.vue')
    },
    {
      path: '/sweets',
      name: 'sweets',
      component: () => import('views/my/iconNav/Sweets.vue')
    },
    {
      path: '/inventory',
      name: 'inventory',
      component: () => import('views/my/iconNav/Inventory.vue')
    },
    {
      path: '/record',
      name: 'record',
      component: () => import('views/my/iconNav/Record.vue')
    },
    {
      path: '/exchange',
      name: 'exchange',
      component: () => import('views/my/listNav/Exchange.vue')
    },
    {
      path: '/partner',
      name: 'partner',
      component: () => import('views/my/listNav/Partner.vue')
    },
    {
      path: '/promotion',
      name: 'promotion',
      component: () => import('views/my/listNav/Promotion.vue')
    },
    {
      path: '/settings',
      name: 'settings',
      component: () => import('views/my/listNav/settings/Settings.vue')
    },
    {
      path: '/changePwd',
      name: 'changePwd',
      component: () => import('views/my/listNav/settings/ChangePwd.vue')
    },
    {
      path: '/exportSy',
      name: 'exportSy',
      component: () => import('views/my/listNav/settings/ExportSy.vue')
    },
    {
      path: '/language',
      name: 'language',
      component: () => import('views/my/listNav/settings/Language.vue')
    },
    {
      path: '/about_us',
      name: 'about_us',
      component: () => import('views/my/listNav/settings/About_us.vue')
    },
    {
      path: "*",
      redirect: "/"
    }
  ]
});

export default router;
